package com.jie.controller;

import com.jie.lanxin.dto.AiImageDTO;
import com.jie.lanxin.vo.AiImageVO;
import com.jie.response.RespBean;
import com.jie.lanxin.impl.AiImageService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/api")
@Api(tags = "AI虚拟绘画模块")
public class AiImageController {

    @Autowired
    private AiImageService aiImageService;

    @ApiOperation(value = "AI绘画接口")
    @PostMapping("/get/image")
    public RespBean<AiImageDTO> getAiImage(@RequestBody AiImageVO aiImageVO) throws Exception {
        return RespBean.success("AiImage",aiImageService.taskSubmit(aiImageVO));
    }
}
